﻿<!DOCTYPE html>

<html>
<head>
    <meta charset="utf-8">
    <title>@ViewBag.Title @ViewBag.IsAuthenticated - Fly社区</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="keywords" content="fly,layui,前端社区">
    <meta name="description" content="Fly社区是模块化前端UI框架Layui的官网社区，致力于为web开发提供强劲动力">
    <link href="~/Content/res/layui/css/layui.css" rel="stylesheet" />
    <link href="~/Content/res/css/global.css" rel="stylesheet" />
</head>
<body>
    <div class="header">
        <div class="main">
            <a class="logo" href="/" title="Fly">Fly社区</a>
            <div class="nav">
                <a class="nav-this" href="@Url.Action("Index","Post")">
                    <i class="iconfont icon-wenda"></i>问答
                </a>
                <a href="http://m.zhengjinfan.cn/" target="_blank">
                    <i class="iconfont icon-ui"></i>框架
                </a>
            </div>

            <div class="nav-user">
                @if (!HttpContext.Current.User.Identity.IsAuthenticated)
                {
                <!-- 未登入状态 -->
                    <a class="unlogin" href="@Url.Action("Login","Account")"><i class="iconfont icon-touxiang"></i></a>
                    <span><a href="@Url.Action("Login","Account")">登入</a><a href="@Url.Action("Register","Account")">注册</a></span>
                    @*<p class="out-login">
                        <a href="" onclick="layer.msg('正在通过QQ登入', {icon:16, shade: 0.1, time:0})" class="iconfont icon-qq" title="QQ登入"></a>
                        <a href="" onclick="layer.msg('正在通过微博登入', {icon:16, shade: 0.1, time:0})" class="iconfont icon-weibo" title="微博登入"></a>
                    </p>*@
                }
                else
                {
                <!-- 登入后的状态 -->
                    Html.RenderAction("HeaderForLogIn");
                    <div class="nav">
                        <a href="@Url.Action("Set","Account")"><i class="iconfont icon-shezhi"></i>设置</a>
                        <a href="@Url.Action("LogOut","Account")"><i class="iconfont icon-tuichu" style="top: 0; font-size: 22px;"></i>退了</a>
                    </div>
                }
            </div>
        </div>
    </div>
    <div>
        @RenderBody()
    </div>


    <div class="footer">
        <p>
            <a href="http://fly.layui.com/">Fly社区</a> @DateTime.Now.Year &copy;
            <a href="http://www.layui.com/">fly.zhengjinfan.cn</a>
        </p>
        @*<p>
            <a href="http://fly.layui.com/auth/get" target="_blank">产品授权</a>
            <a href="http://fly.layui.com/jie/3147.html" target="_blank">VIP说明</a>
            <a href="http://www.layui.com/" target="_blank">商务合作</a>
            <a href="http://weibo.com/SentsinXu" target="_blank" rel="nofollow">微博</a>
            <a href="http://fly.layui.com/jie/2461.html" target="_blank">微信公众号</a>
        </p>*@
    </div>
    <script src="~/Content/res/layui/layui.js"></script>
    <script>
        layui.cache.page = location.pathname.match(/user/g) ? 'user' : 'jie';



        var $uesr = layui.data('user').user;
        layui.cache.user = $uesr !== undefined &&'@HttpContext.Current.User.Identity.IsAuthenticated'==='True' ? $uesr : {
            username: '游客'
            , uid: -1
            , avatar: '../Content/res/images/avatar/00.jpg'
            , experience: 83
            , sex: '男'
        };
        layui.config({
            version: "1.0.0"
            , base: '../Content/res/mods/'
        }).extend({
            fly: 'index'
        }).use(['fly'], function () {
            var fly = layui.fly,
                $ = layui.jquery;
            
            //如果你是采用模版自带的编辑器，你需要开启以下语句来解析。
            $('.detail-body').each(function () {
                var othis = $(this), html = othis.html();
                othis.html(fly.content(html));
            });
        });
    </script>
    @RenderSection("scripts", false)
</body>
</html>
